Skip to main content

Login

Connect to the broker, only once this function has returned successfully can any other operations be performed.

Request to be POSTed to uri : /NorenWClientTP/QuickAuth

Request Details :

Parameter NamePossible valueDescription
jData*Should send json object with fields in below list
Json FieldsPossible valueDescription
apkversion*Application version.
uid*User Id of the login user
pwd*Sha256 of the user entered password.
factor2*DOB or PAN as entered by the user. (DOB should be in DD-MM-YYYY)
vc*Vendor code provided by noren team, along with connection URLs
appkey*Sha256 of uid
imei*Send mac if users logs in for desktop, imei is from mobile
addldivinfOptional field, Value must be in below format:
ipaddrOptional field
sourceAPI

Example

api = new Api({});
api.login(authparams)
.then((res) => {
console.log('Reply: ', res);

Response Details :

Json FieldsPossible valueDescription
statOk or Not_OkLogin Success Or failure status
susertokenIt will be present only on login success. This data to be sent in subsequent requests in jKey field and web socket connection while connecting.
lastaccesstimeIt will be present only on login success.
spasswordresetY [If emsg is “Password Expired” or “Change Password” and stat is Not_Ok ]If Y Mandatory password reset to be enforced. Otherwise the field will be absent.
exarrJson array of strings with enabled exchange names
unameUser name
prarrJson array of Product Obj with enabled products, as defined below.
actidAccount id
emailEmail Id
brknameBroker id
emsgThis will be present only if Login fails.

Sample Success Response :

{
"request_time": "20:18:47 19-05-2020",
"stat": "Ok",
"susertoken": "3b97f4c67762259a9ded6dbd7bfafe2787e662b3870422ddd343a59895f423a0",
"lastaccesstime": "1589899727"
}

Sample Failure Response :

{
"request_time": "20:32:14 19-05-2020",
"stat": "Not_Ok",
"emsg": "Invalid Input : Wrong Password"
}